//
//  PhotoSelectVC.m
//  UILbrary
//
//  Created by Apple on 2023/3/1.
//  Copyright © 2023 mac. All rights reserved.
//

#import "PhotoSelectVC.h"
#import "PickImageHandle.h"

@interface PhotoSelectVC ()

@property (nonatomic, strong) PickImageHandle *pickImageHandle;

@end

//MARK: - system


@implementation PhotoSelectVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self p_loadConfig];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [super touchesBegan:touches withEvent:event];
    [self.pickImageHandle pickPhote];
}

//MARK: - Private

- (void)p_loadConfig
{
    self.title = @"图片选择";
    
    self.view.backgroundColor = [UIColor systemGroupedBackgroundColor];
    
    UILabel *label = [UILabel new];
    label.text = @"选择图片";
    label.textColor = [UIColor blackColor];
    [self.view addSubview:label];
    
    label.frame = CGRectMake(0, 0, 100, 40);
    label.center = self.view.center;
    
}


//MARK: - get

- (PickImageHandle *)pickImageHandle
{
    if(!_pickImageHandle){
        _pickImageHandle = [PickImageHandle new];
        _pickImageHandle.vc = self;
    }
    return _pickImageHandle;
}

@end
